package org.fly.controller.wap.customer;

import org.fly.bean.query.ClassificationQuery;
import org.fly.bean.warpper.ClassificationTreeWarpper;
import org.fly.bean.warpper.ClassificationWarpper;
import org.fly.controller.AbstractController;
import org.fly.service.ClassificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by rongzhao.zhu on 2018/3/29.
 */
@Controller
@RequestMapping("/wap/customer/classification/")
public class WapCClassificationController extends AbstractController {
    @Autowired
    ClassificationService classificationService;
    @RequestMapping(value = "treeMap", produces = "application/json;charset=utf-8")
    @ResponseBody
    public String treeMap(){
        List<ClassificationTreeWarpper> list =  classificationService.treeMapAll();
        return toJSONString(createDataTip(list));
    }
}
